<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('隐患通知')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-announce-add">
        <input name="dzbm" th:value="${dzbm}" type="hidden" required>
        <div class="form-group">
            <label class="col-sm-3 control-label">标题：</label>
            <div class="col-sm-8">
                <input name="title" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">接收人：</label>
            <div class="col-sm-8">
                <input id="userName" class="form-control" onclick="selectUsers()" type="text" readonly required>
                <input name="toUserId" type="hidden">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">内容：</label>
            <div class="col-sm-8">
                <input name="msgContent" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "system/message";
    $("#form-announce-add").validate({
        focusCleanup: true
    });

    function selectUsers() {
        $.modal.open("选择接收人", $.common.setURL(prefix + "/user"));
    }

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/sendAnnounce", $('#form-announce-add').serialize());
        }
    }
</script>
</body>
</html>
